﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LibFriesland_Campina_CRM;

public partial class ViewSupSale : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["account"] == null)
            Response.Redirect("login.aspx");
        if (!IsPostBack)
        {
            databindSup();
        }
    }

    #region Lien ket du lieu
    private void databindSup()
    {
        List<BizSupervisor> sups = BizSupervisor.getAll();
        cboSup.DataSource = sups;
        cboSup.DataValueField = "sup_charid";
        cboSup.DataTextField = "name";
        cboSup.DataBind();

        dtFromDate.Date = DateTime.Now.Date;
        dtToDate.Date = DateTime.Now.Date;

        ListItem item = new ListItem("--", "");
        cboSup.Items.Add(item);
        cboSup.SelectedIndex = cboSup.Items.Count - 1;
    }
    #endregion
}